Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

[docs] render the documentation as a website #1840

Merged
merged 14 commits into from
Nov 6, 2020

Conversation

flynnduism
Copy link
Member

This PR renders the content of the /docs dir as a hugo static website, deployed via Netlify.
Preview url: https://osm-docs.netlify.app/

Screen Shot 2020-10-14 at 1 31 05 PM


There are a few WIP pieces to be added to this, either here or in subsequent PRs...

@flynnduism flynnduism requested a review from a team as a code owner October 14, 2020 22:26
@flynnduism flynnduism self-assigned this Oct 14, 2020
@shashankram
Copy link
Member

@flynnduism looks great, would you mind rebasing.

@flynnduism
Copy link
Member Author

@shashankram will do - I'll update this PR to omit any changes to the docs markdown files, to avoid these conflicts.

@flynnduism
Copy link
Member Author

flynnduism commented Oct 19, 2020

Working on these dos:

  • add a Readme for the website
  • include versioning menu (as per these steps)
  • rebase this PR to avoid conflicts of docs/content/

@flynnduism
Copy link
Member Author

This is ready for review @phillipgibson

  • added a website Readme with all of the website info and notes
  • included release versioning for the project. process notes included in the Readme
  • resolved conflicts, freshly rebased

I'd recommend this PR be followed up with edits to the current documentation files at docs/*.md, to review how they're organized, and cross-linked and to review their metadata to work in this new format.

@codecov-io
Copy link

codecov-io commented Oct 27, 2020

Codecov Report

Merging #1840 into main will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1840      +/-   ##
==========================================
+ Coverage   56.55%   56.57%   +0.01%     
==========================================
  Files         140      140              
  Lines        5644     5644              
==========================================
+ Hits         3192     3193       +1     
+ Misses       2449     2448       -1     
  Partials        3        3              
Impacted Files Coverage Δ
pkg/envoy/route/config.go 96.03% <0.00%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5988b66...368ef1b. Read the comment docs.

@flynnduism
Copy link
Member Author

flynnduism commented Oct 27, 2020

The addition of the Netlify bot was causing OSM pull requests to fail. #1930

Screen Shot 2020-10-27 at 2 16 50 PM


This is disabled for now. If this PR is merged in, I can reactivate the integration afterwards with some limitations to avoid these issues reappearing.

Steps to reactivate Netlify integration (for auto deploys, and generating previews of pull requests)

phillipgibson
phillipgibson previously approved these changes Nov 2, 2020

![OSM Install Demo](https://github.com/openservicemesh/osm/raw/main/img/osm-install-demo-v0.2.0.gif "OSM Install Demo")

See the [installation guide](docs/installation_guide.md) for more detailed options.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link doesn't work in the preview and it seems like it wouldn't work in general - assuming this is being generated from the code repo, do we need to change it to a fully qualified URL so it can work from here?

Copy link
Member Author

@flynnduism flynnduism Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this link for now so that a broken link is not introduced.


I'd like to keep this PR focused on generating the website (config and theme) and have content edits to the docs be added separately via follow up PRs & Issues. Discussed with @phillipgibson, there are edits that should happen and I think those are best handled by the OSM team, before this website be made accessible to the public.

Recommended follow-up edits:

  • Create a proper landing page - the current index.md page referenced here is temporary (copied from the OSM readme), a tailored Docs welcome / intro is needed to best guide project users
  • Content needs to be reorganized - right now only 1 file exists in the docs/content site dir. The content should be reviewed and moved into the required structure, grouped into subsections as needed *
  • Review metadata - the existing docs need Hugo frontmatter added to render properly for the web *

I had carried out some of this work via this PR, but it was problematic as this PR is already large without any docs files edits - there were a lot of rebase conflicts from other changes in flight. This PR would in turn then cause a lot of other rebase headaches for other open PRs. Hence, I removed those edits and reduced the size of this PR.

* The website README that is introduced in this PR provides further details on the ideal structure and the necessary front matter metadata that should be used.

Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>

[docs] reinstate original docs content to resolve conflicts

Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
@bridgetkromhout
Copy link
Contributor

This looks good. Question, the "feedback" thing links to "https://github.com/USERNAME/REPOSITORY/issues/new" - if we want to use that, where do we customize it with the correct repo?

Also, I think there may be a formatting issue in the footer, as the CNCF statement is staying over on the left:

image

Finally, there's something weird here: https://osm-docs.netlify.app/docs/design/readme/ - this is listed in the sidebar as Onboarding VMs (which also has another link):
image

Other than these minor issues, I think it's pretty great. Do we merge it now and just not link it from the front page until you have all the content as desired?

@phillipgibson
Copy link
Contributor

I'm fine with getting it merged to get it live and we can clean up those details you called out.

@bridgetkromhout
Copy link
Contributor

@phillipgibson Okay! I think if you approve the changes as well, @flynnduism will be able to merge it.

@shashankram
Copy link
Member

@flynnduism Once this change is merged, does it affect how new documents are added/updated by developers or is the website generation transparent?


* built with the [Hugo](https://gohugo.io/) static site generator
* custom theme uses [Docsy](https://www.docsy.dev/) as a base, with [Bootstrap](https://getbootstrap.com/) as the underlying css framework and some [OSM custom sass](https://github.com/openservicemesh/osm/pull/1840/files#diff-374e78d353e95d66afe7e6c3e13de4aab370ffb117f32aeac519b15c2cbd057aR1)
* deployed to [Netlify](https://app.netlify.com/sites/osm-docs/deploys) via merges to master. (@flynnduism can grant additional access to account)
Copy link
Contributor

@bridgetkromhout bridgetkromhout Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master

main


## Deploying the site:

The site auto deploys the master branch via [Netlify](https://app.netlify.com/sites/osm-docs). Once pull requests are merged the changes will appear at docs.openservicemesh.io after a couple of minutes. Check the [logs](https://app.netlify.com/sites/osm-docs/deploys) for details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master

main

{{ $gh_repo := ($.Param "github_repo") }}
{{ $gh_subdir := ($.Param "github_subdir") }}
{{ $gh_project_repo := ($.Param "github_project_repo") }}
{{ $gh_branch := (default "master" ($.Param "github_branch")) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master

main

@phillipgibson phillipgibson merged commit 574731d into openservicemesh:main Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants